package com.restkeeper.store.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.restkeeper.store.entity.Credit;
import com.restkeeper.store.entity.CreditCompanyUser;

import java.util.List;

/**
 * <p>
 * 挂账服务类
 * </p>
 */
public interface ICreditService extends IService<Credit> {

    /**
     * 新增挂账
     * @return
     */
    boolean add(Credit credit, List<CreditCompanyUser> users);

    IPage<Credit> queryPage(int pageNum, int pagesize, String userName);

    Credit queryById(String id);

    boolean updateInfo(Credit credit,List<CreditCompanyUser> users);
}
